import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.JFrame;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class JFrameEstudiante extends javax.swing.JFrame {
	//private JFrame JFrameInicio;
	private JTabbedPane jTabbedPane;
	private JPanel jPanelBuscarEstudiante;
	private JPanel jPanelRetirarEstudiante;
	private JButton btOkBuscar;
	private JTextField txtNotaFinalBuscar;
	private JLabel lblNotaFinalBuscar;
	private JLabel lblEstatusBuscar;
	private JTextField txtApellidoInscribir;
	private JLabel lblApellidoInscribir;
	private JTextField txtNombreInscribir;
	private JLabel lblNombreInscribir;
	private JTextField txtCedulaInscribir;
	private JButton btLimpiar;
	private JButton btInscribir;
	private JLabel lblCedulaInscribir;
	private JLabel lblDatosInscribir;
	private JLabel lblDatosBuscar;
	private JTextField txtEstatusBuscar;
	private JTextField txtApellidoBuscar;
	private JButton btLimpiarBuscar;
	private JButton btLimpiarRetirar;
	private JTextField txtApellidoRetirar;
	private JLabel lblApellidoRetirar;
	private JTextField txtNombreRetirar;
	private JLabel lblNombreRetirar;
	private JLabel lblDatosRetirar;
	private JButton btOkRetirar;
	private JTextField txtCedulaRetirar;
	private JLabel lblCedulaRetirar;
	private JLabel lblApellidoBuscar;
	private JLabel lblNombreBuscar;
	private JTextField txtNombreBuscar;
	private JTextField txtCedulaBuscar;
	private JLabel lblcedulabuscar;
	private JPanel jPanelInscribirEstudiante;
    private Seccion sec=new Seccion();
    
	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JFrameEstudiante inst = new JFrameEstudiante(); //???????????
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	public JFrameEstudiante()
	{
		super();
		
		//sec = new Seccion();
		//sec.setNroSeccion("3");
		//System.out.println(sec.getNroSeccion());
		initGUI();
	}
	
	/*public JFrameEstudiante(JFrame JFrameInicio) {
		super();
		
		this.JFrameInicio = JFrameInicio;
		initGUI();
	}*/
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			
			this.setTitle("Administrador de Estudiantes");
			getContentPane().setBackground(new java.awt.Color(255,255,255));
			{
				jTabbedPane = new JTabbedPane();
				getContentPane().add(jTabbedPane, BorderLayout.CENTER);
				{
					jPanelBuscarEstudiante = new JPanel();
					GroupLayout jPanelBuscarEstudianteLayout = new GroupLayout((JComponent)jPanelBuscarEstudiante);
					jPanelBuscarEstudiante.setLayout(jPanelBuscarEstudianteLayout);
					jTabbedPane.addTab("Buscar Estudiante", null, jPanelBuscarEstudiante, null);
					jPanelBuscarEstudiante.setBackground(new java.awt.Color(255,255,255));
					{
						lblcedulabuscar = new JLabel();
						lblcedulabuscar.setText("Ingrese la Cedula");
						lblcedulabuscar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtCedulaBuscar = new JTextField(8);
					}
					{
						btLimpiarBuscar = new JButton();
						btLimpiarBuscar.setText("Limpiar");
						btLimpiarBuscar.setBackground(new java.awt.Color(173,216,230));
						btLimpiarBuscar.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btLimpiarBuscar.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btLimpiarBuscar.mouseClicked, event="+evt);
								//TODO add your code for btLimpiarBuscar.mouseClicked
								txtCedulaBuscar.setText("");
								txtNombreBuscar.setText("");
								txtApellidoBuscar.setText("");
								txtNotaFinalBuscar.setText("");
								txtEstatusBuscar.setText("");
							}
						});
					}
					{
						btOkBuscar = new JButton();
						btOkBuscar.setText("Buscar");
						btOkBuscar.setBackground(new java.awt.Color(173,216,230));
						btOkBuscar.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btOkBuscar.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btOkBuscar.mouseClicked, event="+evt);
								//TODO add your code for btOkBuscar.mouseClicked
								if(txtCedulaBuscar.getText().equals(""))
								{
									JOptionPane.showMessageDialog(null, "Ingrese una Cedula","ERROR",0);
								}
								else if(sec.VerificarEstudiante(txtCedulaBuscar.getText()) == false)
								{
									JOptionPane.showMessageDialog(null, "El estudiante no esta inscrito.","ERROR",0);
									txtNombreBuscar.setText("");
									txtApellidoBuscar.setText("");
									txtCedulaBuscar.setText("");
								}
								else
								{
									txtNombreBuscar.setText(sec.estudiantes.elementAt(sec.buscarEstudianteMenu(txtCedulaBuscar.getText())).getNombre());
									txtApellidoBuscar.setText(sec.estudiantes.elementAt(sec.buscarEstudianteMenu(txtCedulaBuscar.getText())).getApellido());
									txtNotaFinalBuscar.setText(String.valueOf(sec.estudiantes.elementAt(sec.buscarEstudianteMenu(txtCedulaBuscar.getText())).getNotaFinal()));
									txtEstatusBuscar.setText(sec.estudiantes.elementAt(sec.buscarEstudianteMenu(txtCedulaBuscar.getText())).getEstatus());
								}
														
							}
						});

					}
					{
						lblEstatusBuscar = new JLabel();
						lblEstatusBuscar.setText("Estatus:");
						lblEstatusBuscar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtEstatusBuscar = new JTextField();
					}
					{
						lblDatosBuscar = new JLabel();
						lblDatosBuscar.setText("===Datos del Estudiante===");
					}
					{
						txtNombreBuscar = new JTextField();
					}
					{
						lblNombreBuscar = new JLabel();
						lblNombreBuscar.setText("Nombre: ");
						lblNombreBuscar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						lblApellidoBuscar = new JLabel();
						lblApellidoBuscar.setText("Apellido:");
						lblApellidoBuscar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtApellidoBuscar = new JTextField();
					}
					{
						lblNotaFinalBuscar = new JLabel();
						lblNotaFinalBuscar.setText("NotaFinal:");
						lblNotaFinalBuscar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtNotaFinalBuscar = new JTextField();
					}

					jPanelBuscarEstudianteLayout.setVerticalGroup(jPanelBuscarEstudianteLayout.createSequentialGroup()
						.addContainerGap(23, 23)
						.addComponent(lblDatosBuscar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						.addGap(20)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(btOkBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblcedulabuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addComponent(txtCedulaBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGap(28)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup()
						    .addComponent(btLimpiarBuscar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addComponent(txtNombreBuscar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(12))
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addComponent(lblNombreBuscar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(16)))
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(txtApellidoBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblApellidoBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGap(23)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(txtNotaFinalBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblNotaFinalBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGap(22)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(txtEstatusBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblEstatusBuscar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addContainerGap(47, 47));
					jPanelBuscarEstudianteLayout.setHorizontalGroup(jPanelBuscarEstudianteLayout.createSequentialGroup()
						.addContainerGap(55, 55)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addComponent(lblcedulabuscar, GroupLayout.PREFERRED_SIZE, 133, GroupLayout.PREFERRED_SIZE)
						        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						        .addComponent(txtCedulaBuscar, GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE))
						    .addGroup(jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addGroup(jPanelBuscarEstudianteLayout.createParallelGroup()
						            .addComponent(lblNombreBuscar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						                .addComponent(lblApellidoBuscar, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE)
						                .addGap(12))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						                .addComponent(lblEstatusBuscar, GroupLayout.PREFERRED_SIZE, 68, GroupLayout.PREFERRED_SIZE)
						                .addGap(12))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						                .addComponent(lblNotaFinalBuscar, GroupLayout.PREFERRED_SIZE, 74, GroupLayout.PREFERRED_SIZE)
						                .addGap(6)))
						        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						        .addGroup(jPanelBuscarEstudianteLayout.createParallelGroup()
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						                .addComponent(txtEstatusBuscar, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE)
						                .addGap(58))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						                .addComponent(txtNotaFinalBuscar, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						                .addGap(101))
						            .addComponent(txtApellidoBuscar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 173, GroupLayout.PREFERRED_SIZE)
						            .addComponent(txtNombreBuscar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 173, GroupLayout.PREFERRED_SIZE)))
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addGap(42)
						        .addComponent(lblDatosBuscar, GroupLayout.PREFERRED_SIZE, 209, GroupLayout.PREFERRED_SIZE)
						        .addGap(14)))
						.addGap(29)
						.addGroup(jPanelBuscarEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelBuscarEstudianteLayout.createSequentialGroup()
						        .addComponent(btOkBuscar, 0, 84, Short.MAX_VALUE)
						        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 0, GroupLayout.PREFERRED_SIZE))
						    .addComponent(btLimpiarBuscar, GroupLayout.Alignment.LEADING, 0, 88, Short.MAX_VALUE))
						.addContainerGap(38, 38));
				}
				{
					jPanelRetirarEstudiante = new JPanel();
					GroupLayout jPanelRetirarEstudianteLayout = new GroupLayout((JComponent)jPanelRetirarEstudiante);
					jPanelRetirarEstudiante.setLayout(jPanelRetirarEstudianteLayout);
					jTabbedPane.addTab("Retirar Estudiante", null, jPanelRetirarEstudiante, null);
					jPanelRetirarEstudiante.setBackground(new java.awt.Color(255,255,255));
					{
						lblCedulaRetirar = new JLabel();
						lblCedulaRetirar.setText(" Ingrese la Cedula");
						lblCedulaRetirar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtCedulaRetirar = new JTextField();
					}
					{
						btOkRetirar = new JButton();
						btOkRetirar.setText("Retirar");
						btOkRetirar.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btOkRetirar.setBackground(new java.awt.Color(173,216,230));
						btOkRetirar.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btOkRetirar.mouseClicked, event="+evt);
								//TODO add your code for btOkRetirar.mouseClicked
								if(	sec.VerificarEstudiante(txtCedulaRetirar.getText()) == false)
								{
									JOptionPane.showMessageDialog(null, "El estudiante no esta inscrito.","ERROR",0);
									txtCedulaRetirar.setText("");
									txtNombreRetirar.setText("");
									txtApellidoRetirar.setText("");
								}
								else	
								{
									
									Estudiante er = sec.retirarEstudiante(txtCedulaRetirar.getText());
									txtNombreRetirar.setText(er.getNombre());
									txtApellidoRetirar.setText(er.getApellido());
									JOptionPane.showMessageDialog(null, "El estudiante fue Retirado exitosamente");
															
									//JFrameInicio.getSeccion().inscribirEstudiante(student);
								}
							
							}
						});

					}
					{
						btLimpiarRetirar = new JButton();
						btLimpiarRetirar.setText("Limpiar");
						btLimpiarRetirar.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btLimpiarRetirar.setBackground(new java.awt.Color(173,216,230));
						btLimpiarRetirar.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btLimpiarRetirar.mouseClicked, event="+evt);
								//TODO add your code for btLimpiarRetirar.mouseClicked
								txtCedulaRetirar.setText("");
								txtNombreRetirar.setText("");
								txtApellidoRetirar.setText("");
							}
						});
					}
					{
						lblDatosRetirar = new JLabel();
						lblDatosRetirar.setText("Datos del Estudiante Retirado");
					}
					{
						lblNombreRetirar = new JLabel();
						lblNombreRetirar.setText("Nombre:");
						lblNombreRetirar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtNombreRetirar = new JTextField();
					}
					{
						lblApellidoRetirar = new JLabel();
						lblApellidoRetirar.setText("Apellido:");
						lblApellidoRetirar.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtApellidoRetirar = new JTextField();
					}
					jPanelRetirarEstudianteLayout.setHorizontalGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						.addContainerGap(52, 52)
						.addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addComponent(lblCedulaRetirar, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE)
						        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
						        .addComponent(txtCedulaRetirar, GroupLayout.PREFERRED_SIZE, 122, GroupLayout.PREFERRED_SIZE)
						        .addGap(35))
						    .addGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addGap(7)
						        .addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						            .addGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						                .addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						                    .addComponent(lblNombreRetirar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)
						                    .addGroup(GroupLayout.Alignment.LEADING, jPanelRetirarEstudianteLayout.createSequentialGroup()
						                        .addComponent(lblApellidoRetirar, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						                        .addGap(10)))
						                .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
						                .addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						                    .addComponent(txtNombreRetirar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE)
						                    .addComponent(txtApellidoRetirar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE))
						                .addGap(41))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelRetirarEstudianteLayout.createSequentialGroup()
						                .addGap(41)
						                .addComponent(lblDatosRetirar, GroupLayout.PREFERRED_SIZE, 239, GroupLayout.PREFERRED_SIZE)))))
						.addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						    .addGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addComponent(btLimpiarRetirar, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE))
						    .addGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addComponent(btOkRetirar, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)))
						.addContainerGap(38, Short.MAX_VALUE));
					jPanelRetirarEstudianteLayout.setVerticalGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						.addContainerGap(35, 35)
						.addGroup(jPanelRetirarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(txtCedulaRetirar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblCedulaRetirar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addComponent(btOkRetirar, 0, 43, Short.MAX_VALUE)
						.addComponent(lblDatosRetirar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						.addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addComponent(btLimpiarRetirar, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
						        .addGap(6))
						    .addGroup(jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addGap(24)
						        .addGroup(jPanelRetirarEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						            .addComponent(txtNombreRetirar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						            .addComponent(lblNombreRetirar, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))))
						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
						.addGroup(jPanelRetirarEstudianteLayout.createParallelGroup()
						    .addComponent(txtApellidoRetirar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelRetirarEstudianteLayout.createSequentialGroup()
						        .addComponent(lblApellidoRetirar, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(8)))
						.addContainerGap(105, 105));
				}
				{
					jPanelInscribirEstudiante = new JPanel();
					jTabbedPane.addTab("Inscribir Estudiante", null, jPanelInscribirEstudiante, null);
					GroupLayout jPanelInscribirEstudianteLayout = new GroupLayout((JComponent)jPanelInscribirEstudiante);
					jPanelInscribirEstudiante.setLayout(jPanelInscribirEstudianteLayout);
					jPanelInscribirEstudiante.setBackground(new java.awt.Color(255,255,255));
					{
						lblDatosInscribir = new JLabel();
						lblDatosInscribir.setText("===Datos del Estudiante===");
					}
					{
						lblCedulaInscribir = new JLabel();
						lblCedulaInscribir.setText("Ingrese la Cedula:");
						lblCedulaInscribir.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtCedulaInscribir = new JTextField();
					}
					{
						txtNombreInscribir = new JTextField();
					}
					{
						lblApellidoInscribir = new JLabel();
						lblApellidoInscribir.setText("Apellido:");
						lblApellidoInscribir.setFont(new java.awt.Font("Dialog",0,11));
					}
					{
						txtApellidoInscribir = new JTextField();
					}
					{
						btInscribir = new JButton();
						btInscribir.setText("Inscribir");
						btInscribir.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btInscribir.setBackground(new java.awt.Color(173,216,230));
						btInscribir.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btInscribir.mouseClicked, event="+evt);
								//TODO add your code for btInscribir.mouseClicked
								if(	sec.VerificarEstudiante(txtCedulaInscribir.getText()) == true)
								{
									JOptionPane.showMessageDialog(null, "El estudiante ya esta inscrito.","ERROR",0);
								}
								else if(txtCedulaInscribir.getText().equals("") || txtNombreInscribir.getText().equals("") || txtApellidoInscribir.getText().equals(""))
									{	
									JOptionPane.showMessageDialog(null, "Ingrese todos los datos");
					
									}
									else
									{
										Estudiante student = new Estudiante(txtCedulaInscribir.getText(),txtNombreInscribir.getText(), txtApellidoInscribir.getText());
										sec.inscribirEstudiante(student);
										JOptionPane.showMessageDialog(null, "El estudiante fue Inscrito exitosamente");
										txtCedulaInscribir.setText("");
										txtNombreInscribir.setText("");
										txtApellidoInscribir.setText("");
										
									}
							}
						});
					}
					{
						btLimpiar = new JButton();
						btLimpiar.setText("Limpiar");
						btLimpiar.setFont(new java.awt.Font("Bitstream Charter",1,12));
						btLimpiar.setBackground(new java.awt.Color(173,216,230));
						btLimpiar.addMouseListener(new MouseAdapter() {
							public void mouseClicked(MouseEvent evt) {
								System.out.println("btLimpiar.mouseClicked, event="+evt);
								//TODO add your code for btLimpiar.mouseClicked
								txtCedulaInscribir.setText("");
								txtNombreInscribir.setText("");
								txtApellidoInscribir.setText("");
							}
						});
					}
					{
						lblNombreInscribir = new JLabel();
						lblNombreInscribir.setText("Nombre:");
						lblNombreInscribir.setFont(new java.awt.Font("Dialog",0,11));
					}
					jPanelInscribirEstudianteLayout.setHorizontalGroup(jPanelInscribirEstudianteLayout.createSequentialGroup()
						.addContainerGap(31, 31)
						.addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						        .addGap(0, 0, Short.MAX_VALUE)
						        .addComponent(lblCedulaInscribir, GroupLayout.PREFERRED_SIZE, 136, GroupLayout.PREFERRED_SIZE)
						        .addGap(11)
						        .addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						            .addComponent(txtNombreInscribir, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 144, GroupLayout.PREFERRED_SIZE)
						            .addComponent(txtApellidoInscribir, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 144, GroupLayout.PREFERRED_SIZE)
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						                .addComponent(txtCedulaInscribir, GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE)
						                .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED))))
						    .addGroup(jPanelInscribirEstudianteLayout.createSequentialGroup()
						        .addGap(23)
						        .addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						                .addComponent(lblNombreInscribir, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)
						                .addGap(0, 190, Short.MAX_VALUE))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						                .addComponent(lblApellidoInscribir, GroupLayout.PREFERRED_SIZE, 102, GroupLayout.PREFERRED_SIZE)
						                .addGap(0, 164, Short.MAX_VALUE))
						            .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						                .addGap(59)
						                .addComponent(lblDatosInscribir, GroupLayout.PREFERRED_SIZE, 207, GroupLayout.PREFERRED_SIZE)))))
						.addGap(24)
						.addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						    .addComponent(btLimpiar, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE)
						    .addComponent(btInscribir, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE))
						.addContainerGap(33, 33));
					jPanelInscribirEstudianteLayout.setVerticalGroup(jPanelInscribirEstudianteLayout.createSequentialGroup()
						.addContainerGap(31, 31)
						.addComponent(lblDatosInscribir, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						.addGap(13)
						.addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						        .addComponent(btLimpiar, GroupLayout.Alignment.BASELINE, 0, 41, Short.MAX_VALUE)
						        .addComponent(txtCedulaInscribir, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						        .addGap(8)
						        .addComponent(lblCedulaInscribir, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(0, 19, Short.MAX_VALUE)))
						.addGap(32)
						.addGroup(jPanelInscribirEstudianteLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
						    .addComponent(txtNombreInscribir, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE)
						    .addComponent(lblNombreInscribir, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGap(19)
						.addGroup(jPanelInscribirEstudianteLayout.createParallelGroup()
						    .addComponent(btInscribir, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 40, GroupLayout.PREFERRED_SIZE)
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						        .addComponent(txtApellidoInscribir, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(18))
						    .addGroup(GroupLayout.Alignment.LEADING, jPanelInscribirEstudianteLayout.createSequentialGroup()
						        .addComponent(lblApellidoInscribir, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
						        .addGap(26)))
						.addContainerGap(87, 87));
				}
			}
			pack();
			this.setSize(490, 357);
			
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
